home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Offline Browsing / HTTrack.exe / data1.cab / Sources / src / htscatchurl.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-04-28  |  2.9 KB  |  104 lines

  1. /* ------------------------------------------------------------ */
  2. /*
  3. HTTrack Website Copier, Offline Browser for Windows and Unix
  4. Copyright (C) Xavier Roche and other contributors
  5.  
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19.  
  20.  
  21. Important notes:
  22.  
  23. - We hereby ask people using this source NOT to use it in purpose of grabbing
  24. emails addresses, or collecting any other private information on persons.
  25. This would disgrace our work, and spoil the many hours we spent on it.
  26.  
  27.  
  28. Please visit our Website: http://www.httrack.com
  29. */
  30.  
  31.  
  32. /* ------------------------------------------------------------ */
  33. /* File: URL catch .h                                           */
  34. /* Author: Xavier Roche                                         */
  35. /* ------------------------------------------------------------ */
  36.  
  37. // Fichier intercepteur d'URL .h
  38.  
  39. #ifndef HTS_CATCHURL_DEFH
  40. #define HTS_CATCHURL_DEFH 
  41.  
  42. #include "htsbasenet.h"
  43.  
  44. /*
  45. #if _WIN32
  46.  #include <ctype.h>
  47.  #include <winsock.h>
  48.  #include <conio.h>
  49.  typedef SOCKET T_SOC;
  50.  typedef struct hostent FAR t_hostent;
  51.  #define  bzero(a,b) memset(a,0,b)
  52.  #define  bcopy(a,b,c) memcpy(b,a,c)
  53. #else
  54.  //#define INVALID_SOCKET -1
  55.  #include <netdb.h>
  56.  #include <sys/types.h>
  57.  #include <sys/socket.h>
  58.  #include <netinet/in.h>
  59.  #include <sys/time.h>
  60.  #include <sys/ioctl.h>
  61.  // pas la peine normalement..
  62. #if HTS_PLATFORM!=3
  63.  #include <sys/filio.h>
  64. #else
  65. #endif
  66.  //typedef int T_SOC;
  67.  //typedef struct hostent t_hostent;
  68. #endif
  69. */
  70.  
  71. // Fonctions
  72. void socinput(T_SOC soc,char* s,int max);
  73. T_SOC catch_url_init_std(int* port_prox,char* adr_prox);
  74. T_SOC catch_url_init(int* port,char* adr);
  75. int catch_url(T_SOC soc,char* url,char* method,char* data);
  76.  
  77. #define CATCH_RESPONSE \
  78.   "HTTP/1.0 200 OK\r\n"\
  79.   "Content-type: text/html\r\n"\
  80.   "\r\n"\
  81.   "<!-- Generated by HTTrack Website Copier -->\r\n"\
  82.   "<HTML><HEAD>\r\n"\
  83.   "<TITLE>Link caught!</TITLE>\r\n"\
  84.   "<SCRIPT LANGUAGE=\"Javascript\">\r\n"\
  85.   "<!--\r\n"\
  86.   "function back() {\r\n"\
  87.   "  history.go(-1);\r\n"\
  88.   "}\r\n"\
  89.   "// -->\r\n"\
  90.   "</SCRIPT>\r\n"\
  91.   "</HEAD>\r\n"\
  92.   "<BODY>\r\n"\
  93.   "<H2>Link captured into HTTrack Website Copier, you can now restore your proxy preferences!</H2>\r\n"\
  94.   "<BR><BR>\r\n"\
  95.   "<H3><A HREF=\"javascript:back();\">Clic here to go back</A></H3>\r\n"\
  96.   "</BODY></HTML>"\
  97.   "<!-- Generated by HTTrack Website Copier -->\r\n"\
  98.   "\r\n"\
  99.  
  100. #endif
  101.  
  102.  
  103.  
  104.